home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 2002 November / SGI Freeware 2002 November - Disc 3.iso / dist / fw_qt3.idb / usr / freeware / Qt / examples / demo / opengl / gltexobj.h.z / gltexobj.h
C/C++ Source or Header  |  2002-04-08  |  1KB  |  46 lines

  1. /****************************************************************************
  2. ** $Id:  qt/gltexobj.h   3.0.3   edited Oct 12 12:18 $
  3. **
  4. ** Copyright (C) 1992-2000 Trolltech AS.  All rights reserved.
  5. **
  6. ** This file is part of an example program for Qt.  This example
  7. ** program may be used, distributed and modified without limitation.
  8. **
  9. *****************************************************************************/
  10.  
  11. /****************************************************************************
  12. **
  13. ** This is a simple QGLWidget displaying an openGL wireframe box
  14. **
  15. ****************************************************************************/
  16.  
  17. #ifndef GLTEXOBJ_H
  18. #define GLTEXOBJ_H
  19.  
  20. #include "glcontrolwidget.h"
  21.  
  22. class GLTexobj : public GLControlWidget
  23. {
  24.     Q_OBJECT
  25.  
  26. public:
  27.     GLTexobj( QWidget* parent, const char* name = 0, WFlags f = 0 );
  28.     ~GLTexobj();
  29.  
  30. protected:
  31.     void        animate();
  32.     void        initializeGL();
  33.     void        paintGL();
  34.     void        resizeGL( int w, int h );
  35.  
  36.     virtual GLuint     makeObject( const QImage& tex1, const QImage& tex2 );
  37.  
  38.     void        setRotationImpulse( double x, double y, double z );
  39.  
  40. private:
  41.     GLuint object;
  42.     double impX, impY, impZ;
  43. };
  44.  
  45. #endif // GLTEXOBJ_H
  46.